package spring.study.annotation.bean;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @author study
 * @version 1.0
 * @date 2020/6/19 17:24
 */
@Component
public class Cat implements InitializingBean, DisposableBean {
    public Cat() {

    }

    @Override
    public void destroy() throws Exception {
        System.out.println(" Cat 容器销毁时调用");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println(" Cat 容器创建时调用");
    }
}
